package com.zebraphp.devtool.httpUtils.NetImageHttp;

import android.content.Context;

import com.squareup.picasso.Picasso;
import com.zebraphp.devtool.AppBase;

/**
 * Created by SimonTeam on 2017/8/12.
 * 毕加索 图片请求工具 实现了图片请求加载标准的工具
 */
public class PicassoImageHttpStandardUtil implements ImageLoaderInterfaceStandard {

    @Override
    public void loadImage(ImageRequestBuiler request) {
        //调用 毕加索 组件 加载库
        Picasso.with(AppBase.getInstance()).load(request.getUrl()).placeholder(request.getPlaceHolder()).into(request.getImageView());
    }

    @Override
    public void loadImage(Context context, ImageRequestBuiler request) {
        //调用 毕加索 组件 加载库
        Picasso.with(context).load(request.getUrl()).placeholder(request.getPlaceHolder()).into(request.getImageView());
    }

}
